using Gateway.Common.Enums;
using SqlSugar;

namespace Gateway.IQuery.DataDic.Result;

/// <summary>
/// 数据字典详情
/// </summary>
[SugarTable("DataDic")]
public class DataDicDetailResult : BaseResult
{
    /// <summary>
    /// 字典标识
    /// </summary>
    public string DataDicId { get; set; }

    /// <summary>
    /// 字典名称
    /// </summary>
    public string Name { get; set; }

    /// <summary>
    /// 字典编码
    /// </summary>
    public string Code { get; set; }

    /// <summary>
    /// 字典值
    /// </summary>
    public string Value { get; set; }

    /// <summary>
    /// 描述
    /// </summary>
    public string Description { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int Sort { get; set; }

    /// <summary>
    /// 父级标识
    /// </summary>
    public string ParentId { get; set; }

    /// <summary>
    /// 字典类别  category 类别  value 字典键值
    /// </summary>
    public string DicType { get; set; }

    /// <summary>
    /// 字典类别 名称
    /// </summary>
    [SugarColumn(IsIgnore = true)]
    public string DicTypeName => DataDicTypeEnum.FromValue(DicType)?.DisplayName ?? "";
}